Skip to main content

Impression-level ad revenue

Impression-level ad revenue provides you with a granular calculation of how much revenue was generated by each ad impression.

The XMediator SDK provides this data on the ad's impression callback for you to use in your internal systems or any mobile measurement partner (MMP).

ImpressionData class

The ImpressionData class is passed as a parameter of the didRecordImpression callbacks on each ad format.

FieldData typeDescription
revenuenumberEstimated revenue that the ad generated.
ecpmnumberEcpm value for the ad.
placementIdstringPlacement id of the waterfall used to load this ad.
adNetworkstringName of the network used to render this ad.
mediationstringName of the mediation service used to mediate this ad network.
subNetworkNamestringName of the sub network used to render this ad, if available.
creativeIdstringId of the creative rendered, if available.
adSpacestringThe name of the ad space provided when presenting the ad, if available.
waterfallResultLoadResultDescribes the result of the waterfall used to load this ad.

SDK-to-SDK integration samples

MMPs usually recommend an SDK-to-SDK integration over a S2S/API one, as they are able to provide less revenue matching discrepancies, more data in real time, and tools such as SKAdNetwork conversion value management based on ad revenue.

Adjust

useRewardedEvents(
{
onImpression: (placementId, impressionData) => {
// You have to map the sdk's mediation values to adjust expected ones. eg, 'applovin_max_sdk'
const source = impressionData.mediation;

var adjustAdRevenue = new AdjustAdRevenue(source);
adjustAdRevenue.setRevenue(impressionData.revenue, "USD");
adjustAdRevenue.setAdRevenueNetwork(impressionData.adNetwork);
adjustAdRevenue.setAdRevenueUnit(impressionData.placementId);

Adjust.trackAdRevenue(adjustAdRevenue);
},
},
[]
);

AppsFlyer

useRewardedEvents(
{
onImpression: (placementId, impressionData) => {
// You have to map the impressionData.mediation value to the expected ones. eg, 'MEDIATION_NETWORK.IRONSOURCE'
const mediation = MEDIATION_NETWORK.IRONSOURCE;

const adRevenueData = {
monetizationNetwork: impressionData.adNetwork,
mediationNetwork: mediation,
currencyIso4217Code: 'USD',
revenue: impressionData.revenue,
additionalParameters: {},
};

appsFlyer.logAdRevenue(adRevenueData);
},
},
[]
);

Singular

useRewardedEvents(
{
onImpression: (placementId, impressionData) => {
// You have to map the impressionData.mediation value to the expected ones. eg, 'AppLovin'
const mediation = 'AppLovin';

const adData = {
adPlatform: mediation,
currency: "USD",
revenue: impressionData.revenue,
};

Singular.adRevenue(adData);
},
},
[]
);